﻿using System;
using Xamarin.Forms;

namespace CustomControlTest
{
    public class MyControlSpec {
        public string Icon { get; set; }
        public string Title { get; set; }
    }

    public partial class CustomControlTestPage : ContentPage
    {
        public MyControlSpec QQ { get; set; }
        public MyControlSpec WX { get; set; }
        
        public CustomControlTestPage()
        {
            InitializeComponent();
            this.QQ = new MyControlSpec { Icon = "qq_logo", Title = "QQ" };
            this.WX = new MyControlSpec { Icon = "wx_logo", Title = "WeiXin" };
            BindingContext = this;

            //设置控件的属性
            this.qqLogin.TextColor = Color.Blue;

            //获取控件的子元素
            Label wxLabel = this.wxLogin.TextControl;
            wxLabel.FontSize = 20;
        }
    }
}
